package com.exam.pojo.base;

import com.exam.pojo.domain.Question;
import com.exam.utils.CollUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor(staticName = "of")
@NoArgsConstructor
public class PageResult <T> {

    private long total;
    private List<T> list;


    public static PageResult<Question> empty(){
        return PageResult.of(0, CollUtils.emptyList());
    }
}
